<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>document</title>
    <!-- 省份数据地址：http://hmajax.itheima.net/api/province -->
    <!-- axios库地址：https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js-->
</head>
<p class="my-p"></p>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script>
    axios({
        url:'http://hmajax.itheima.net/api/province '
    }).then(result=>{
        console.log(result)
        //好习惯：多打印
        console.log(result.data.list)
        console.log(result.data.list.join('<br>'))
        //把准备好的省份插入到页面里面
        document.querySelector('.my-p').innerHTML=result.data.list.join('<br>')
    })
</script>
<body>

</body>
</html>